/*
 * dedupv1 - iSCSI based Deduplication System for Linux
 *
 * (C) 2008 Dirk Meister
 * (C) 2009 - 2011, Dirk Meister, Paderborn Center for Parallel Computing
 * (C) 2012 Dirk Meister, Johannes Gutenberg University Mainz
 *
 * This file is part of dedupv1.
 *
 * dedupv1 is free software: you can redistribute it and/or modify it under the terms of the
 * GNU General Public License as published by the Free Software Foundation, either version 3
 * of the License, or (at your option) any later version.
 *
 * dedupv1 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
 * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with dedupv1. If not, see http://www.gnu.org/licenses/.
 */

#include "default_monitor.h"
#include <core/dedup_system.h>
#include <base/logging.h>
#include "dedupv1d.h"
#include "monitor.h"

using std::string;

LOGGER("DefaultMonitorAdapter");

namespace dedupv1d {
namespace monitor {

bool DefaultMonitorAdapter::ParseParam(const string& key, const string& value) {
    // ignore
    return true;
}

MonitorAdapterRequest* DefaultMonitorAdapter::OpenRequest() {
    DefaultMonitorAdapterRequest* r = new DefaultMonitorAdapterRequest(this);
    CHECK_RETURN(r, NULL, "Alloc adapter request failed");
    return r;
}

DefaultMonitorAdapter::DefaultMonitorAdapter() {

}

DefaultMonitorAdapter::~DefaultMonitorAdapter() {

}

DefaultMonitorAdapterRequest::DefaultMonitorAdapterRequest(DefaultMonitorAdapter* adapter) {
    this->parentAdapter = adapter;
}

DefaultMonitorAdapterRequest::~DefaultMonitorAdapterRequest() {
}

string DefaultMonitorAdapterRequest::Monitor() {
    return this->parentAdapter->Monitor();
}

bool DefaultMonitorAdapterRequest::ParseParam(const string& key, const string& value) {
    return this->parentAdapter->ParseParam(key, value);
}

}
}
